package com.wc._16届国特冲刺营._03动态规划心法_线性DP最优决策链构建.李白打酒加强版;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @Author congge
 * @Date 2025/5/7 21:48
 * @description
 * https://www.lanqiao.cn/courses/51805/learning/?id=4072895&compatibility=false
 */
public class Main {
    /**
     * 思路：
     * 有两种思路吧
     * 经过第 i 家的时候, 看看遇到的是店还是 花, 对应更改即可
     */
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int N = 210, M = N << 1, P = (int)1e9 + 7;
    // f[i][j] 表示经过 第 i 家, 经过 j 家 店面, 有 k 斗酒
    static long[][][] f = new long[N][N][M];
    static int n, m;

    public static void main(String[] args) {
        n = sc.nextInt();
        m = sc.nextInt();
        f[0][0][2] = 1;
        for (int i = 1; i < n + m; i++) {
            for (int j = 0; j < m; j++) {
                for (int k = 0; k <= n + m; k++) {
                    // 遇到花
                    f[i][j][k] = (f[i][j][k] + f[i - 1][j][k + 1]) % P;
                    // 遇到店
                    if (k > 0 && k % 2 == 0 && j - 1 >= 0) f[i][j][k] = (f[i][j][k] + f[i - 1][j - 1][k / 2]) % P;
                }
            }
        }
        out.println(f[n + m - 1][n][1]);
        out.flush();
    }
}

class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    String nextLine() {
        String s = "";
        try {
            s = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    // 是否由下一个
    boolean hasNext() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = br.readLine();
                if (line == null)
                    return false;
                st = new StringTokenizer(line);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }
}

